

#ifndef THREAD_SEARCH_LOGGER_LIST_H
#define THREAD_SEARCH_LOGGER_LIST_H

#include <wx/event.h>

#include "ThreadSearchLoggerBase.h"

class wxPanel;
class wxWindow;
class wxListEvent;
class wxListCtrl;
class wxString;

class ThreadSearch;
class ThreadSearchView;
class sThreadSearchEvent;

class ThreadSearchLoggerList : public wxEvtHandler, public ThreadSearchLoggerBase
{
public:
	
	ThreadSearchLoggerList(ThreadSearchView& threadSearchView, ThreadSearch& threadSearchPlugin,
							InsertIndexManager::eFileSorting fileSorting, wxPanel* pParent, long id);

	
	virtual ~ThreadSearchLoggerList();

	
	virtual eLoggerTypes GetLoggerType() {return TypeList;}

	
	virtual void Update();

	
	virtual void OnThreadSearchEvent(const sThreadSearchEvent& event);

	
	virtual void Clear();

	
	virtual wxWindow* GetWindow();

	
	virtual void SetFocus();

	
	void OnLoggerListClick(wxListEvent& event);

	
	void OnLoggerListDoubleClick(wxListEvent& event);

    void SyncLoggerToPreview();


protected:
	
	void SetListColumns();

	
	bool GetFileLineFromListEvent(wxListEvent& event, wxString& filepath, long &line);

	
	virtual void ConnectEvents(wxEvtHandler* pEvtHandler);

	
	virtual void DisconnectEvents(wxEvtHandler* pEvtHandler);

    void OnMouseWheelEvent(wxMouseEvent& event);

	wxListCtrl* m_pListLog;
	long m_LastLeftMouseClickIndex;
};

#endif // THREAD_SEARCH_LOGGER_LIST_H
